package com.katian.analyse.picking;

import java.util.Collection;

/**
 * User: csavard
 * Date: 13-06-03
 */
public class CommandeFacturee {
    private long noCommande;
    private Collection<Facture> factures;

    public long getNoCommande() {
        return noCommande;
    }

    public void setNoCommande(long noCommande) {
        this.noCommande = noCommande;
    }

    public Collection<Facture> getFactures() {
        return factures;
    }

    public void setFactures(Collection<Facture> factures) {
        this.factures = factures;
    }

    public int getCaisses() {
        int nbUnitees = 0;
        if (factures != null && factures.size() > 0) {
            for (Facture facture : factures) {
                nbUnitees += facture.getUnite();
            }
        }
        return nbUnitees;
    }
}
